import request from '@/utils/aliyunRequest';

const surveyApi = {};

surveyApi.findQuestionConfig = (id, questionId) => {
	return request({
		url: '/aliyun-api/survey/question/config/' + id + '/' + questionId,
		method: 'get',
	})
}
surveyApi.configSurveyQuestionExt = (id, questionId, params) => {
	return request({
		url: '/aliyun-api/survey/config-sq-ext/' + id + '/' + questionId,
		method: 'put',
		data: params,
	})
}
surveyApi.configQuestions = (id, params) => {
	return request({
		url: '/aliyun-api/survey/config-questions/' + id,
		method: 'put',
		data: params,
	})
}
surveyApi.deleteQuestions = (id, params) => {
	return request({
		url: '/aliyun-api/survey/delete-questions/' + id,
		method: 'put',
		data: params,
	})
}
surveyApi.sortQuestions = (id, params) => {
	return request({
		url: '/aliyun-api/survey/sort-questions/' + id,
		method: 'put',
		data: params,
	})
}
surveyApi.detail = (id) => {
	return request({
		url: '/aliyun-api/survey/questions/' + id,
		method: 'get',
	})
}
surveyApi.page = (params) => {
	return request({
		url: '/aliyun-api/survey/page',
		method: 'get',
		params: params,
	})
}
surveyApi.add = (params) => {
	return request({
		url: '/aliyun-api/survey',
		method: 'post',
		data: params,
	})
}
surveyApi.update = (params) => {
	return request({
		url: '/aliyun-api/survey',
		method: 'put',
		data: params,
	})
}
surveyApi.get = (id) => {
	return request({
		url: '/aliyun-api/survey/' + id,
		method: 'get',
	})
}
surveyApi.delete = (id) => {
	return request({
		url: '/aliyun-api/survey/' + id,
		method: 'delete',
	})
}


export default surveyApi